//
//  MyNotificationCenter.h
//  RunLoopDemo
//
//  Created by zhangjikuan on 2021/6/4.
//  Copyright © 2021 hsgd. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NSString *MYNotifcationName NS_EXTENSIBLE_STRING_ENUM;
@class NSString, NSDictionary, NSOperationQueue;

NS_ASSUME_NONNULL_BEGIN
/// Notifations
@interface MyNotification : NSObject <NSCopying, NSCoding>

@property (readonly, copy) MYNotifcationName name;
@property (nullable, readonly, retain) id object;
@property (nullable, readonly, copy) NSDictionary *userInfo;

- (instancetype)initWithName:(MYNotifcationName)name object:(nullable id)object userInfo:(nullable NSDictionary *)userInfo;

- (nullable instancetype)initWithCoder:(NSCoder *)coder;

@end

@interface MyNotification (MyNotificationCreation)

+ (instancetype)notificationWithName:(NSNotificationName)aName object:(nullable id)anObject;
+ (instancetype)notificationWithName:(NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo;
@end

@interface MyNotificationCenter : NSObject {
    @package
    void *_impl;
    void *_callback;
    void *_pad[11];
}


@end

NS_ASSUME_NONNULL_END
